<!DOCTYPE html>
<html ng-app="indexApp">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!--<link href="css/bootstrap-theme.css" rel="stylesheet">-->
    <link href="css/jquery-ui.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/sweetalert2.css" rel="stylesheet">
    <script src="js/angular/1.6.3/angular.js"></script>
    <script src="js/angular/1.6.3/angular-route.js"></script>
    <script src="js/angular/1.6.3/angular-ui-router.js"></script>
    <script src="js/angular/1.6.3/angular-file-upload.js"></script>
    <script src="js/jquery-2.1.4.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery-ui.js"></script>
    <script src="js/ie10-viewport-bug-workaround.js"></script>
    <script src="js/ie-emulation-modes-warning.js"></script>
    <script src="js/sweetalert.min.js"></script>
    <script src="ng/indexApp.js"></script>
    <script src="ng/anaTaskCreateManageCtrl.js"></script>
    <title>任务管理</title>
</head>
<body ng-controller="anaTaskCreateManageCtrl">
<div class="container-fluid">
    <div class="" style="height: 20px"></div>

    <span class="btn-info btn-sm " style="background-color: #00a4e7;display: inline-block">任务管理
    </span>
    <span class="glyphicon glyphicon-chevron-right"></span>
    <span class="btn-info btn-sm " style="display: inline-block" disabled="">数据集
    </span>
    <span class="glyphicon glyphicon-chevron-right" style="color: #8c8c8c"></span>
    <span class="btn-info btn-sm " style="display: inline-block" disabled="">数据预处理
    </span>
    <span class="glyphicon glyphicon-chevron-right" style="color: #8c8c8c"></span>
    <span class="btn-info btn-sm " style="display: inline-block" disabled="">数据建模
    </span>
    <span class="glyphicon glyphicon-chevron-right" style="color: #8c8c8c"></span>
    <span class="btn-info btn-sm " style="display: inline-block" disabled="">预测分析
    </span>
    <h3 class="page-header" style="margin-top: 10px"></h3>

    <div class="row">
        <div class="col-sm-12 col-md-12">
            <div class="panel panel-default" style="background-color: #2d5f8b">
                <div class="panel-body">
                    <div class="form-group form-group-sm">
                        <div class="col-md-12">
                            <div class="row">
                                <div class="col-sm-4 col-md-4">
                                    <input type="text" class="form-control" id="taskID" disabled
                                           placeholder="任务ID(创建成功后自动生成)" ng-model="taskConfig.taskId" readonly="readonly">
                                </div>
                                <div class="col-sm-6 col-md-6">
                                    <input type="text" class="form-control" id="taskName"
                                           placeholder="任务名称" ng-model="taskConfig.taskName">
                                </div>

                                <div class="col-sm-2 col-md-2">
                                    <button type="button" class="btn btn-sm btn-block btn-success"
                                            ng-click="createTask()">
                                        创建任务 <span class="glyphicon glyphicon-send" aria-hidden="true"></span>
                                    </button>
                                </div>
                            </div>
                            <br>
                            <div class="row">
                                <div class="col-sm-12 col-md-12">
                                    <input type="text" class="form-control" id="taskDesc"
                                           placeholder="任务描述" ng-model="taskConfig.taskDesc">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default" >
                <div class="panel-heading">任务列表</div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-md-12" style="max-height:450px;overflow:auto">
                            <table
                                    class="table table-bordered table-striped table-condensed table-hover"
                                    ng-init="getAllTasks()">
                                <thead>
                                <tr class="default" style="background-color: #00a4e7;color:#fff;font-weight:normal">
                                    <th style="font-weight:normal">任务ID</th>
                                    <th style="font-weight:normal">任务名称</th>
                                    <th style="font-weight:normal">任务描述</th>
                                    <th style="font-weight:normal">创建时间</th>
                                    <th colspan="2" style="font-weight:normal">操 作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="task in taskList" ng-click="showTaskDetail(task)">
                                    <td ng-style='{"background-color": task.taskId==focusTask.taskId? "#00a4e7": ""}'>{{task.taskId}}</td>
                                    <td>{{task.taskName}}</td>
                                    <td>{{task.taskDesc | limitTo: 20}}</td>
                                    <td>{{task.createTime | myDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                                    <td>
                                        <button type="button"
                                                class="btn btn-danger btn-xs btn-block"
                                                ng-click="delTask(task)">删 除
                                        </button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>


</div>
</body>
</html>